Skip to content

Add index aliases - #95

Merged
paulirwin merged 1 commit into
feature23:mainfrom
daplein:feature/aliases
Oct 26, 2026
Merged

paulirwin merged 1 commit into
feature23:mainfrom
daplein:feature/aliases

Conversation

@daplein

@daplein daplein commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Adds service-level aliases, modelled on synonym maps (#79).

  • GET/POST /aliases, GET/PUT/DELETE aliases('x') and aliases/x
  • File storage (<name>.alias.json), same path-character guard as indexes and synonym maps
  • An alias targets exactly one existing index and cannot share a name with an index (and vice versa, 409)
  • Document routes (search, get, count, suggest, autocomplete, index) resolve aliases via IIndexResolver; /indexes routes do not, as in Azure
  • A dangling alias answers 404 like a missing index
  • aliasesCount in /servicestats reports real usage
  • Spec in docs/specs/aliases.md, README section

Tests: AliasTests (unit) and AliasIntegrationTests (CRUD, validation, resolution, re-pointing, dangling alias, stats).

@daplein

daplein commented Oct 16, 2026

Copy link
Copy Markdown
Contributor Author

This is the largest of four independent PRs (#94, #96 and #97 are the others, each branching off main), so merge order doesn't matter. If it helps review, #94 and #97 are small and can go first. Happy to answer any questions or split this up if that would make it easier to review.

@paulirwin paulirwin left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution! There are a few things I'm going to change post-merge here, but I don't see any reason to hold this up.

Things I'm going to update in a follow-up PR (based on Microsoft's docs for the alias feature):

  • Deleting an index an alias points to should return 400
  • GET and PUT on /indexes should accept an alias
  • The API version is out of date (2026-04-01 is out of preview and supports this)

Service-level /aliases routes, file-based storage, and alias resolution on the
document routes. Spec in docs/specs/aliases.md.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@paulirwin
paulirwin merged commit 2fa299b into feature23:main Oct 26, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants